package com.atguigu.common.exception;

/**
 * @author fangy
 * @date 2022-09-03 23:15
 */
public enum BizCodeEnum {


    UNKNOW_EXCEPTION(10000,"系统未知异常"),
    PRODUCT_UP_EXCEPTION(11000,"商品上架错误"),
    VAILD_SMSTIME_EXCEPTION(12000,"短信发送频繁"),
    VAILD_USERNAME_EXCEPTION(12001,"用户名重复"),
    VAILD_PHONE_EXCEPTION(12002,"手机号码重复"),
    ERROR_USERNAME_EXCEPTION(13000,"用户名不存在"),
    ERROR_PASSWORD_EXCEPTION(13001,"登录密码错误"),
    VAILD_EXCEPTION(10001,"参数格式校验错误"),
    NO_STOCK_EXCEPTION(21000,"商品库存不足");


    private int code;
    private String msg;

    BizCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
